package com.demo.hc.biz.area.bean;

/**
 * Created by 1 on 2017/4/25.
 */
public enum AreaTypeEnum {

    /** 国家 */
    COUNTRY(1),
    /** 城市 */
    CITY(2),
    /** 行政区 */
    AREA(3),
    /** 板块*/
    PLATE(4);

    private int type;

    public int getType() {
        return type;
    }


    public void setType(int type) {
        this.type = type;
    }

    AreaTypeEnum(int type) {
        this.type = type;
    }

    public static AreaTypeEnum getAreaTypeEnum(int type){
        for (AreaTypeEnum typeEnum: values()) {
            if (typeEnum.getType()==type){
                return typeEnum;
            }
        }
        return null;
    }

}
